package com.jumi.microservice.yzhpay.pay.order;

import com.jumi.microservice.yzhpay.constant.CheckNameEnum;
import com.jumi.microservice.yzhpay.constant.ConfigPath;
import com.jumi.microservice.yzhpay.constant.OrderPrefixEnum;
import com.jumi.microservice.yzhpay.dto.request.AlipayOrderRequest;
import com.jumi.microservice.yzhpay.pay.BasePay;
import com.jumi.microservice.yzhpay.util.OrderUtil;
import com.jumi.microservice.yzhpay.util.Property;

/**
 * 支付宝实时下单
 */
public class AlipayOrder extends BasePay<AlipayOrderRequest> {
    @Override
    public AlipayOrderRequest assembleParam() {
        return AlipayOrderRequest.builder()
                .order_id(OrderUtil.getOrderId(OrderPrefixEnum.ALIPAY_ORDER.getValue()))
                .dealer_id(Property.getProperties(ConfigPath.YZH_DEALERID))
                .broker_id(Property.getProperties(ConfigPath.YZH_BROKERID))
                .real_name("董世南")
                .card_no("18753032828")
                .id_card("372922199602014500")
                .pay("0.01")
                .pay_remark("测试数据")
                .check_name(CheckNameEnum.NOCHECK.getValue())
                .notify_url(Property.getProperties(ConfigPath.YZH_BACKNOTIFY_URL))
                .build();
    }
}
